home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 41.zip / BS1 part 41 / parallel-C disk .adf / srvconst.h < prev    next >
C/C++ Source or Header  |  1997-12-31  |  5KB  |  186 lines

  1. /*************************************************************************
  2. *
  3. *  TDS Server  Global Constant Definitions
  4. *
  5. *  13th February 1987.
  6. *
  7. *  Copyright INMOS Limited, 1987.
  8. *
  9. **************************************************************************/
  10.  
  11. /*
  12.  *************************************************************************
  13.  * Upgrade to 3L-Server for Amiga 2000 18.-Apr.-89 by Gerhard Bartz
  14.  *************************************************************************
  15.  */
  16.  
  17.  
  18. #define TRUE 1
  19. #define FALSE 0
  20. #define BIT_0  1
  21. /*
  22.  * The following flags may be used:
  23.  *
  24.  * IBMserver-if defined, inserts code to test which IBM PC the server is
  25.  *           running on, and sets up the link adaptor addresses appropriately
  26.  *
  27.  * NECserver-if defined, inserts code to set up the link adaptor addresses
  28.  *            for the NEC PC.
  29.  *
  30.  * quickIO  -if defined, does not generate code for the 'C' versions of the
  31.  *           link driving procs - the assembly module quickio.asm must then
  32.  *           be linked in with the C.
  33.  *
  34.  * BREAKOUT -if defined, adds code to terminate the server when the
  35.  *           breakout character is typed at the keyboard.
  36.  *
  37.  */
  38.  
  39. /*
  40.  #define IBMserver TRUE
  41.  #define BREAKOUT  TRUE
  42.  */
  43.  
  44. #define REV_A_FIX TRUE
  45.  
  46. /* ASCII values */
  47. #define SOH                    1
  48. #define CONTROL_D              4
  49. #define BELL                   7
  50. #define BS                     8
  51. #define HT                     9
  52. #define LF                     10
  53. #define VT                     11
  54. #define FF                     12
  55. #define CR                     13
  56. #define CONTROL_Y              25
  57. #define ESCAPE                 27
  58. #define RS                     30
  59. #define SPACE                  32
  60. /* Terminate codes */
  61. #define T_TERMINATED          0
  62. #define T_USR_BRK             3
  63. #define T_USR_STOP            7
  64. #define T_TRANSPUTER_ERR      8
  65. #define T_BAD_BOOT            9
  66. #define T_ILLEGAL_COMMAND     15
  67. #define T_BAD_COMMAND_LINE    16
  68. #define T_BAD_RECORD          17
  69. #define T_BAD_INT32           18
  70.  
  71. /* Key values */
  72. #define EXIT_KEY              ESCAPE
  73. #define REBOOT_KEY            SPACE
  74. #define RECORD_LENGTH         512
  75. #define N_STREAMS             8
  76. #define PARAM_STREAM          N_STREAMS + 1
  77. #define INVALID_STREAM        -1
  78. #define FILE_NAME_LENGTH      64
  79. #define COMMAND_LINE_LENGTH   128
  80. #define DEFAULT_BOOT_FILE     "c:\boot.b4"
  81. #define S_INPUT 1
  82. #define S_OUTPUT 2
  83. #define PERMANENT 0
  84. #define TEMPORARY 1
  85. #define SPECIAL 2
  86. #define HOST_ERROR_BASE        -400
  87. /**** ADD0 begin ****/
  88. #define BOOT_BUFFER_LENGTH     4096
  89. /**** ADD0 end ****/
  90. #define INT32_VALUE      4
  91. #define NILRECORD_VALUE  8
  92. #define RECORD32_VALUE  12
  93. #define ALIENTERMINATE_CMD 0
  94. #define OPENFILE_CMD 1
  95. #define OPENTEMP_CMD 2
  96. #define OPENINPUTSTREAM_CMD 3
  97. #define OPENOUTPUTSTREAM_CMD 4
  98. #define STREAMACCESS_CMD 5
  99. #define STREAMSTATUS_CMD 6
  100. #define STREAMFILE_CMD 7
  101. #define STREAMLENGTH_CMD 8
  102. #define CLOSESTREAM_CMD 11
  103. #define READBLOCK_CMD 12
  104. #define WRITEBLOCK_CMD 13
  105. #define SEEK_CMD 14
  106. #define STREAMCONNECT_CMD 23
  107. #define TERMINATE_CMD 24
  108. #define SETRESULT_CMD 25
  109. #define RUNCOMMAND_CMD 26
  110. #define RENAMEFILE_CMD 27
  111. #define READTIME_CMD 28
  112. #define READKEY_CMD 29
  113. #define RECIEVEBLOCK_CMD 30
  114. #define SENDBLOCK_CMD 31
  115. /**** ADD1 begin ****/
  116. #define CALLINTERRUPT_CMD 32
  117. #define READREGS_CMD 33
  118. #define RUNTIMEDATA_CMD 34
  119. #define READENVIRONMENT_CMD 35
  120. #define PORTREAD_CMD 36
  121. #define PORTWRITE_CMD 37
  122. /**** ADD1 end ****/
  123. #define BINARYBYTESTREAM_ACCESS 0
  124. #define TEXTBYTESTREAM_ACCESS 1
  125. #define MAX_ACCESS_METHOD 1
  126. #define READ_MODE 0
  127. #define WRITE_MODE 1
  128. #define UPDATE_MODE 2
  129. #define MAX_OPEN_MODE 2
  130. #define OLD_FILE 0
  131. #define NEW_FILE 1
  132. #define MAX_EXIST_MODE 1
  133. #define SCREEN_USE 0
  134. #define KEYBOARD_USE 1
  135. #define FILE_USE 2
  136. #define TEMP_USE 3
  137. #define PARAMETER_USE 4
  138. #define CLOSE_OPTION 0
  139. #define CLOSEDEL_OPTION 1
  140. #define MAX_CLOSE_OPTION 1
  141. #define F_FILE_EXISTS -300
  142. #define F_OK 0
  143. #define F_EOF 1
  144. #define FILENAMETOOLONG_ERR 2
  145. #define INVALIDACCESSMETHOD_ERR 3
  146. #define INVALIDOPENMODE_ERR 4
  147. #define INVALIDEXISTMODE_ERR 5
  148. #define INVALIDRECORDLENGTH_ERR 6
  149. #define INVALIDSTDSTREAM_ERR 7
  150. #define INVALIDSTREAMID_ERR 8
  151. #define INVALIDCLOSEOPTION_ERR 9
  152. #define NOSEEKPOSSIBLE_ERR 10
  153. #define INVALIDRECORDNUMBER_ERR 11
  154. #define OPERATIONFAILED_ERR 99
  155. #define NOFREECHANNEL_ERR 100
  156. #define NOSUCHFILE_ERR 101
  157. #define FILEALREADYOPENERR 102
  158. #define READOPENFAIL_ERR 103
  159.  
  160.  
  161. /**** ADD3 begin ****/
  162.  
  163. #define BOOT_FILE_OK 0
  164. #define BOOT_FILE_OPEN_ERR 1
  165. #define BOOT_FILE_READ_ERR 2
  166. #define BOOT_FILE_SEND_ERR 3
  167. #define BOOT_FILE_CLOSE_ERR 4
  168.  
  169. /**** ADD3 end ****/
  170.  
  171. struct STREAM_DESC
  172. {
  173.     int inuse;
  174.     FILE *fileptr;
  175.     int open_m;
  176.     int exist_m;
  177.     int access_m;
  178.     int lifetime_m;
  179.     int result;
  180.     char name [FILE_NAME_LENGTH];
  181. };
  182.  
  183.  
  184.  
  185.  
  186.